<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var age = prompt("请填写您的年龄");
        // console.log(age);
        if (age >= 18) {
            alert("我带你去网吧偷耳机。")
        } else {
            // 当条件不满足时候，执行的语句
            alert("滚回家写作业")
        }
    </script>
</head>

<body>

</body>

</html>